package other_其他模式.service_locator_pattern_服务定位模式;

/**
 * Created with IntelliJ IDEA.
 *
 * @Auther: hihi
 * @Date: 2020/07/10/14:24
 * @Description:
 */
public class ServiceLocatorPatternDemo {
	public static void main(String[] args) {
		Service service1 = ServiceLocator.getService("service1");
		service1.execute();
		service1 = ServiceLocator.getService("service2");
		service1.execute();
		service1 = ServiceLocator.getService("service1");
		service1.execute();
		service1 = ServiceLocator.getService("service2");
		service1.execute();
	}
}
